<template>
  <el-checkbox-group v-model="input">
    <el-checkbox v-for="eventName in eventList" :key="eventName" :label="eventName">
      {{
        eventName
      }}
    </el-checkbox>
  </el-checkbox-group>  
</template>

<script setup>
import { ref, watch } from 'vue';
const props = defineProps({
  modelValue: {
    type: Array,
    default: ()=>[],
  },
});

const emit = defineEmits(['update:modelValue']);

const input = ref(props.modelValue);

watch(input, (newValue) => {
  emit('update:modelValue', newValue);
});
const eventList = ['blur', 'focus', 'click',]
</script>